<template>
	<view :class="[BackGround]" :style="[{'font-weight':Style,'font-family':Font,height:height + 'px'}]">
		<cu-custom bgColor="bg-gradual-blue" isBack="true" @openMenu="openMenu">
			<view slot="backText">返回</view>
			<view slot="content">待处理</view>
		</cu-custom>
		<!-- <screen-view scroll-x="true" style="width: 700px;height: 700px;">
			<web-view :webview-styles="webviewStyles" src="http://47.101.156.202:8443/"></web-view>
		</screen-view> -->
		<view :class="['margin-xs radius shadow shadow-lg bg-white',BackGroundBox]" v-if="isShow">
			<form @submit="formSubmit" @reset="formReset">
				<view :style="{marginBottom:bottom + 'rpx'}">
					<view class="cu-form-group">
						<view class="title">单号</view>
						<input type="text" disabled />
					</view>
					<view class="cu-form-group">
						<view class="title">IP地址</view>
						<input type="text" name="LIP" placeholder="可选值" />
					</view>
					<view class="cu-form-group">
						<view class="title">机器地址</view>
						<input type="text" name="LMAC" placeholder="可选值" />
					</view>

				</view>

			</form>
		</view>
		<button-father :Position="'tb-fa-fixed'">
			<button class="cu-btn bg-blue-gradual  lg shadow tb-flex cu-btn-new" @tap="Reject">驳回</button>
			<button class="cu-btn bg-gradual-blue  lg shadow tb-flex cu-btn-new" @tap="jump">通过</button>
		</button-father>
		<!--顶部下拉菜单-->
		<zyt-input tui-top-dropdown="tui-top-dropdown" bgcolor="rgba(76, 76, 76, 0.95)" :show="menuShow" :height="0" @close="closeMenu"
		 :zvalue="LREMARK" @zblur="zblur">
		</zyt-input>
		<!---顶部下拉菜单-->
	</view>
</template>

<script>
	import ButtonFather from "@/colorui/components/ButtonFather.vue";
	import zytInput from '@/colorui/components/input.vue'
	import {
		mapGetters
	} from 'vuex'
	import {
		getAudit,
		getreject
	} from "@/service/selectList.js"
	export default {
		data() {
			return {
				height: this.screenHeight,
				LREMARK: "",
				menuShow: false,
				zvalue: "",
				lid: "",
				bottom: 100,
				switchA: true,
				isShow: true,

			}
		},
		components: {
			ButtonFather,
			zytInput
		},
		computed: {
			...mapGetters(['Style', 'Font', 'BackGround', 'BackGroundBox'])
		},
		onLoad(option) {
			this.lid = option.lid
		},
		methods: {
			Reject() {
				this.menuShow = true
				// this.LREMARK = e.detail.value
			},
			focus(e) {

			},
			openMenu() {
				this.menuShow = false
			},
			zblur(value) {
				uni.showModal({
					title: '提示',
					content: '请确认是否驳回！',
					success: function(res) {
						if (res.confirm) {
							getreject(this.lid, '300101', global.userinfo.lusercode, 0, value).then(res => {
								uni.showToast({
									title: res.data.msg,
									icon: 'none'
								})
								setTimeout(() => {
									uni.navigateBack({
										delta:1
									})
								},500)
							})
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
				this.LREMARK = value
			},
			blur() {

			},
			closeMenu() {
				this.menuShow = false
			},
			formSubmit(e) {


			},
			formReset() {

			},
			jump() {
				getAudit(this.lid, '300101', global.userinfo.lusercode, 0, '').then(res => {
					uni.showToast({
						title: res.data.msg,
						icon: 'none'
					})
					setTimeout(() => {
						uni.navigateBack({
							delta:1
						})
					},500)
				})
			}
		}
	}
</script>

<style lang="scss">
	.webviewStyles {
		width: 1000px;
	}
</style>
